package com.ugoodtech.mdcc.core.domain;

/* Copyright (C) Ugoodtech, Inc - All Rights Reserved.
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 * Proprietary and confidential.
 * Written by Stone Shaw.
 */

import io.swagger.annotations.ApiModel;
import org.springframework.security.core.GrantedAuthority;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@ApiModel("权限中的模块")
@Entity
@Table(name = "module_authorities")
public class ModuleAuthority extends BaseEntity implements GrantedAuthority {
    private String name;//功能权限代码,比如WEI_XIU_ZHAN_CHECK,维修站查看
    private String description;
    private Integer seq;//排序字段
    private Integer os; //操作平台
    private String authority;
    @Column(length = 50)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public Integer getOs() {
        return os;
    }

    public void setOs(Integer os) {
        this.os = os;
    }

    @Override
    @Transient
    public String getAuthority() {
        return name;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }
}
